

fio_cmd=""
test_count=4

run_one_test(){
    # 执行FIO测试并捕获退出码
    if python3 ./fio_simple.py \
     --fio-command "$fio_cmd"  \
     --nodes $nodes --count $test_count --wait-time 120 ; then
        echo "测试 $i 成功完成，退出码: $?"  
    else
        echo "测试 $i 失败，退出码: $?"
        exit 1
    fi
}

run_test(){
  item=$1
  fio_cmd="fio /root/rbd.fio --output-format=json --section=$item"
  run_one_test
}

nodes="192.166.205.107 192.166.205.108 192.166.205.109"

run_test 4k_randwrite

run_test 4k_randread

run_test 16_randwrite

run_test 16_randread

run_test prepare_write

run_test 1M_write

run_test 1M_read


